package com.ice.work.moment.facade.crawler.enums;

/**
 * @Description 股票评论爬取字段
 * @Author DELL
 * @Create 2019-01-09
 * @Since 1.0.0
 */
@SuppressWarnings("all")
public enum CommentEnum {

    COMMENT_AT(0, "commentAt", "公告日期"),
    STOCK_CODE(1, "shareCode", "股票代码"),
    SORCE(3, "source", "来源"),
    COMMENT(4, "content", "评论");

    public Integer key;
    public String code;
    public String remark;

    CommentEnum(Integer key, String code, String remark) {
        this.key = key;
        this.code = code;
        this.remark = remark;
    }

    public static String getCodeByKey(Integer key) {
        for (CommentEnum gender : CommentEnum.values()) {
            if (gender.key.equals(key)) {
                return gender.code;
            }
        }
        return null;
    }
}
